<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Experience extends Home_Controller {
    
    public function __construct() {
        parent::__construct();
        $this->load->model('Member_sj_model');
      
        
    }
	
	public function index(){
		$data = array();
		$data['top_menu'] = "experience";
		$data['list'] = $this->Member_sj_model->search(array('state'=>1,"img !="=>"",'uid >'=>22), "", 10, 0,"salesnum DESC,id DESC");
		$this->layout_view('home/experience/experience_index',$data);
	}
  
	public function experience_list($name = "canyin"){
		$info = $this->Member_incutry_model->read(array('pinyin'=>$name));
		$data['info'] = $info;
		$data['list'] = $this->Member_sj_model->search(array('state'=>1,"img !="=>"",'industry'=>@$info['id'],'uid >'=>22), "", "","","id DESC");
		if($data['list']){
			$this->layout_view('home/experience/experience_list',$data);
		}else{
			$this->layout_view('home/experience/experience_list_default',$data);
				
		}
		
	}
    public function _remap($method, $params = array()){
		if($method == "index"){
			$this->index();
		}else{
			$this->experience_list($method);
		}
		
	}

}
